<include file='Index/header'/>
<script language="javascript" type="text/javascript" src="__PUBLIC__/My97DatePicker/WdatePicker.js"></script>
<include file='Index/left'/>

<div class="content">

    <div class="header">

        <h1 class="page-title">教师信息管理</h1>
    </div>

    <ul class="breadcrumb">
        <li><a href="{:U('Index/Index')}">首页</a> <span class="divider">/</span></li>
        <li class="active">教师信息管理</li>
    </ul>

    <div class="container-fluid">
        <div class="row-fluid">

            <div class="btn-toolbar">
                <button class="btn btn-primary" onclick="window.location='__CONTROLLER__/Addteacher'"><i
                        class="icon-plus"></i>添加教师
                </button>

                <button class="btn" onclick="window.location='__CONTROLLER__/Daochu/fs/teacher'">导出Excel</button>
                <div class="btn-group">
                </div>
            </div>
            <div class="well well-sm">
                <form id="cx" name="cx" method="post">
                    <lable>教师工号：</lable>
                    <input type="text" name="tid" placeholder="" value="{$Think.session.tid}" style="width:150px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                    <lable>教师姓名：</lable>
                    <input type="text" name="tname" placeholder="" value="{$Think.session.tname}" style="width:150px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                    <lable>教师性别：</lable>
                    <select name="sex" id="sex" style="width:150px">
                        <option value="">请选择性别：</option>

                        <option value="男">男</option>
                        <option value="女">女</option>
                    </select><br/>

                    <lable>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;类&nbsp;型：</lable>
                    <select name="type" id="type" style="width:165px">
                        <option value="">请选择</option>
                        <option value="1">接班老师</option>
                        <option value="2">带班老师</option>
                        <option value="3">值班领导</option>
                    </select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                    <lable>入职时间：</lable>
                    <input type="text" value="{$Think.session.start}" placeholder="" name="start"
                           onClick="WdatePicker()" style="width:150px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;~&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="text" value="{$Think.session.end}" placeholder="" name="end" onClick="WdatePicker()"
                           style="width:150px">
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <button type="button" class="btn btn-primary" onclick="submit()">&nbsp;&nbsp;查&nbsp;&nbsp;询&nbsp;&nbsp;</button>
                </form>


            </div>
            <div class="well" id='well2'>
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>#</th>
                        <th nowrap="">教师工号</th>
                        <th nowrap="">姓名</th>
                        <th nowrap="">性别</th>
                        <th nowrap="">籍贯</th>
                        <th nowrap="">类型</th>
                        <th nowrap="">入职时间</th>
                        <th nowrap="">出生日期</th>
                        <th nowrap="">电话</th>
                        <th nowrap="">电子邮箱</th>
                        <th nowrap="">备注</th>
                        <th nowrap=""></th>
                    </tr>
                    </thead>
                    <tbody>
                    <volist name="tinfo" id="vo">
                        <tr>
                            <td nowrap="">{$vo.id}</td>
                            <td nowrap="">{$vo.tid}</td>
                            <td nowrap="">{$vo.tname}</td>
                            <td nowrap="">{$vo.sex}</td>
                            <td nowrap="">{$vo.nation}</td>
                            <td nowrap="">
                                <if condition="$vo['type'] eq '1'">
                                    接班老师
                                    <elseif condition="$vo['type'] eq 2"/>带班老师
                                    <elseif condition="$vo['type'] eq 3"/>值班领导
                                    <else />
                                </if>
                            </td>
                            <td nowrap="">{$vo.entrydate}</td>
                            <td nowrap="">{$vo.birth}</td>
                            <td nowrap="">{$vo.telephone}</td>
                            <td nowrap="">{$vo.email}</td>
                            <td width='160'>
                                <div id='hd{$vo.id}' class="hd">{$vo.remark}<span id="hd3{$vo.id}" style="display:none"><a
                                        href='javascript:void(0)' onclick='hiden({$vo.id})'>收起</a></span></div>
                                <div id='hd2{$vo.id}'><a href='javascript:void(0)' onclick='show({$vo.id})'>+</a>
                                    <div>
                            </td>
                            <td nowrap="">
                                <a href="__CONTROLLER__/Teacherxg/id/{$vo.id}"><i class="icon-pencil"></i></a>
                                <a onclick="return confirm('正在删除教师{$vo.tname}，请确认')"
                                   href="__CONTROLLER__/del/lb/teacher/id/{$vo.id}"><i class="icon-remove"></i></a>

                            </td>
                        </tr>

                    </volist>

                    </tbody>
                </table>
            </div>


            {$page}


            <script>
                function show(id) {
                    $('#hd' + id).css({'overflow': 'visible'});
                    $('#hd2' + id).hide();
                    $('#hd3' + id).css({'display': 'block'});

                }

                function hiden(id) {

                    $('#hd' + id).css({'overflow': 'hidden'});
                    $('#hd2' + id).show();
                }
            </script>


            <include file='Index/footer'/>
